home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 October / EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso / Aminet / comm / bbs / ACSDD110.lha / Developer / DoorMessage.Structure < prev    next >
Text File  |  1995-04-23  |  24KB  |  517 lines

  1.  
  2.                    DayDream BBS: Door Control Structure
  3.                    ------------------------------------
  4.  
  5. OFFSET  TYPE     LENGTH  DESCRIPTIO.N                                     FLAGS
  6. ==============================================================================
  7.  0000   WORD       02    DOOR COMMAND ID / RETURN CODE                     (-)
  8.  0002   LONG WORD  04    COMMAND DATA FIELD #1                             (-)
  9.  0006   LONG WORD  04    COMMAND DATA FIELD #2                             (-)
  10.  0010   LONG WORD  04    COMMAND DATA FIELD #3                             (-)
  11.  0014   STRING     86    ROOM FOR MISCELLANEOUS VARIABLES                  (-)
  12.  0100   -- END --  00    END OF DOOR CONTROL STRUCTURE                     (-)
  13. ==============================================================================
  14.  
  15.  
  16.                         DayDream BBS: Door Commands
  17.                         ---------------------------
  18.  
  19. ===( ID: 00000 - Exit Door Handler )==========================================
  20.  
  21. Function  : This  command  reports DayDream  BBS that the door  is about to
  22.             terminate. DayDream will ReplyMsg() to this request, which will
  23.             be the last activity between the door program and DayDream BBS.
  24.             DD_DoorHandler will be closed and user returned  to the system.
  25.  
  26. Parameters: None
  27.  
  28. Returns   : Return code of zero to indicate exit
  29.  
  30. ===( ID: 00001 - Type String )================================================
  31.  
  32. Function  : Prints specified string of characters to remote user's display,
  33.             local screen or both. Possible ANSI codes will be automatically
  34.             stripped, if user has chosen an ASCII display mode. When in need
  35.             of changing line, string only needs to contain a linefeed, carriage
  36.             return (ASCII 13) will be inserted automatically.
  37.  
  38. Parameters: Data 1 <> Pointer to the string
  39.  
  40. Note      : You can include carriage returns in the text to use several lines,
  41.             but remember not to type anything longer than 200 lines at once.
  42.  
  43. Returns   : NULL in case of a fatal error or 1L when succesful
  44.  
  45. ===( ID: 00002 - Prompt For User Input )======================================
  46.  
  47. Function  : Prompts user to enter a string. Length will  be restricted as
  48.             requested by the door. Full support for ANSI cursor sequences
  49.             is given, so that user can easily move through the string and
  50.             modify as required.
  51.  
  52. Parameters: Data 1 <> Pointer to the buffer, where the final string will be
  53.                       inserted. To  define a default  string, put  it here,
  54.                       otherwise you MUST specify a NULL-string.
  55.             Data 2 <> Specify maximum length in upper word and a few control
  56.                       bits in the lower one.
  57.  
  58.                       BIT  WHAT WILL HAPPEN IF BIT IS SET
  59.                       ======================================================
  60.                        0   Hidden mode, print *s instead of real characters
  61.                        1   Don't print CR+LF after receiving return code
  62.                        2   Don't allow any characters illegal in filenames
  63.  
  64. Returns   : NULL in case of a fatal error or 1L when succesful
  65.  
  66. ===( ID: 00003 - Inquire Structure Pointers )=================================
  67.  
  68. Function  : This command will return with pointers to several significant
  69.             system structures, such as user structure etc.
  70.  
  71. Parameters: None
  72.  
  73. Returns   : Data 1 <> Various bits concerning system settings:
  74.  
  75.                       BIT  MEANING WHEN SET
  76.                       ======================================================
  77.                        0   Remote connection, otherwise local only
  78.  
  79.             Data 2 <> User's actual last call date and time
  80.  
  81.             Misc 1 <> Array of long word pointers as follows:
  82.  
  83.                       OFFSET  POINTER
  84.                       ==================================================
  85.                        0000   Dos-Library Base Address
  86.                        0004   Intuition-Library Base Address
  87.                        0008   Graphics-Library Base Address
  88.                        0012   ReqTools-Library Base Address
  89.                        0016   DiskFont-Library Base Address
  90.                        0020   Timer-Device Base
  91.                        0024   DayDream BBS Server Unit Message Port
  92.                        0028   Archivers.DAT Pointer
  93.                        0032   DayDream.DAT Pointer
  94.                        0036   Display.DAT Pointer
  95.                        0040   Pointer To Current Display Mode Structure
  96.                        0044   Conferences.DAT Pointer
  97.                        0048   Pointer To Current Conference Structure
  98.                        0052   Pointer To Current Conference's Message Bases
  99.                        0056   Pointer To Current Message Base Structure
  100.                        0060   Protocols.DAT Pointer
  101.                        0064   DayDream BBS Screen Pointer
  102.                        0068   Pointer To Current User's Structure
  103.                        0072   ExternalCommands.DAT Pointer
  104.                        0076   Schedule.DAT Pointer
  105.                        0080   Pointer to a string containing door parameters
  106.  
  107. Note      : These pointers  are provided to save  you from some  typing. For
  108.             example, you could just pick the library bases from here without
  109.             having to open them yourself.
  110.  
  111. CAUTION!  : _NEVER_ USE THESE POINTERS AFTER DAYDREAM HAS CLOSED IT'S DOORPORT
  112.  
  113. ===( ID: 00004 - Type ASCII/ANSI File )=======================================
  114.  
  115. Function  : This command outputs an ASCII or ANSI file into remote terminal,
  116.             local screen or both.
  117.  
  118. Parameters: Data 1 <> Pointer to the filename
  119.             Data 2 <> Nothing
  120.             Data 3 <> Control bits as follows:
  121.  
  122.                       BIT  WHAT WILL HAPPEN IF SET
  123.                       ==================================================
  124.                       000  Add correct path and file extension according
  125.                            to the current display mode settings. If this
  126.                            bit is set, you only need to specify the file
  127.                            name itself. Final name could look like, say,
  128.                            DayDream:Display/ISO/<filename>.GFX.Otherwise
  129.                            DayDream  will attempt  to directly open  the
  130.                            file, without any modifications on it's name.
  131.                       001  In case file couldn't be found,show a visible
  132.                            error message instead of quiting quietly.
  133.                       002  Strip fidonet kludges
  134.                       003  Check file from Conferences directory
  135.                       004  Check if there's file for the current  access
  136.                            level.
  137.                       005  Disable control chars
  138.  
  139. ===( ID: 00005 - Prompt User For Simple Yes Or No  )==========================
  140.  
  141. Function  : This function asks user to answer a simple yes or no question.
  142.             Door program must type the question by itself, since  all this
  143.             function outputs is an ASCII string "Yes" or "No" based on the
  144.             user's answer.
  145.  
  146. Parameters: Data 1 <> Default answer: 0 = No and 1 = Yes
  147.  
  148. Returns   : Data 1 <> User's answer using the values stated above
  149.             R-Code <> NULL in case of a fatal error or 1L when succesful
  150.  
  151. ===( ID: 00006 - Scan UserBase For Specified User Account )===================
  152.  
  153. Function  : This function scans user database (UserBase.DAT) in order to find
  154.             the specified  account. Match can be made in real name or handle.
  155.             Operation is fully non-case-sensitive.
  156.  
  157. Parameters: Data 1 <> Pointer to the search string, wildcards are NOT supported
  158.             Data 2 <> In case one account, for a reason or an another, has to
  159.                       be skipped, it's offset must be provided here. Supply -1L
  160.                       to disable this feature.
  161.  
  162. Returns   : Data 1 <> An offset to the matching account if one was found in the
  163.                       first place. Check >R-Code< first.
  164.             Data 2 <> NULL if match was in user's real name or 1L if it was in
  165.                       the handle.
  166.             R-Code <> NULL if an error occurred, 1W if no match was found or
  167.                       2W when a match was found. If this value is <> 2W, fields
  168.                       Data 1 and Data 2 may contain just about any value.
  169.  
  170. ===( ID: 00007 - UpDate DayDream Data Structures )============================
  171.  
  172. Function  : This function must be called after any DayDream structure has
  173.             been modified. Please remember to observe extreme cautiousness,
  174.             since careless modifications will lead to a system crash.
  175.  
  176. Parameters: Data 1 <> Pass NULL for compability with future revisions
  177.             Data 2 <> Pass NULL for compability with future revisions
  178.             Data 3 <> Pass NULL for compability with future revisions
  179.  
  180. Returns   : R-Code <> NULL if an error occurred and 1L when successful
  181.  
  182. ===( ID: 00008 - Convert an UNiX Style Date To An ASCII String )================
  183.  
  184. Function  : This function will convert an UNiX style date and time values to
  185.             plain ASCII strings. Time can be read from system clock if asked to.
  186.  
  187. Parameters: Data 1 <> Pointer to a work area of twenty bytes  in which DayDream
  188.                       will store the output string 'DD.MM.YYYY',0,'HH:MM:SS',0.
  189.                       DO NOT count on  DayDream setting '.' and ':'  characters
  190.                       between numerical  values; you have to set them yourself!
  191.                       Note that entries will be provided as in Europe.
  192.             Data 2 <> Amount of seconds since 1.1.1978 to  be converted, or -1L
  193.                       to read value from the system clock.
  194. Returns   : Data 1 <> Amount of seconds converted into a string
  195.             R-Code <> NULL if an error occurred and 1L when successful
  196.  
  197. ===( ID: 00009 - Perform File Transfer With A XPR-Protocol )====================
  198.  
  199. Function  : Purpose of this function is to provide an easy way to handle file
  200.             transfers. It is possible to perform  both send and  receive with
  201.             this function. Operation will be fully automatic and independent.
  202.  
  203. Parameters: Data 1 <> Pointer to a data block, consisting of NULL-terminated
  204.                       strings including paths and actual file names of files
  205.                       to be transferred. End  of the block will be  signaled
  206.                       with a $FF (Byte). When receiving, simply pass address
  207.                       of a block containing NULL + termination character.
  208.             Data 2 <> When up, lowest bit will  indicate  send. Otherwise,
  209.                       receive mode will be executed. Leave other bits down
  210.                       for future compability.
  211.             Misc 1 <> Table of miscellaneous variables as follows:
  212.  
  213.                       OFFSET   TYPE     MEANING
  214.                       =======================================================
  215.                        0000    LONG     Pointer to a valid AmigaDOS pathname.
  216.                                         When sending, files with no path spec
  217.                                         will be  looked for in this path, and
  218.                                         when receiving, files will be  placed
  219.                                         in this directory.
  220.  
  221. Returns:    R-Code <> NULL if an error occurred and 1L when successful
  222.  
  223. ===( ID: 00010 - GET OR SET LASTREAD AND AUTOSCAN MAIL POINTERS )===============
  224.  
  225. Function  : This function makes it easy to read and set last read and auto scan
  226.             pointers of any user. Please  be extremely  careful when  modifying
  227.             these values,since failed modifications may lead to a unrecoverably
  228.             corrupted message base.
  229.  
  230. Parameters: Data 1 <> This fields actually consist of three separate values:
  231.  
  232.                       Lower  Word (Bits 00-15) /
  233.  
  234.                       Lower  Byte (Bits 00-07) = Conference number
  235.                       Higher Byte (Bits 08-15) = Message Base Number
  236.  
  237.                       Higher Word (Bits 16-31) = Account Number or NULL
  238.  
  239.                       By passing a value of NULL  in the higher word, actions
  240.                       will be made on the  current user. In case of any other
  241.                       value, changes  will be made to the <n>th  account. So,
  242.                       a value of 1 would make this function to operate on the
  243.                       very first structure found from the MsgBase.LRP file.
  244.  
  245.             Data 2 <> Pass NULL when only READing AutoScan  and LastRead values.
  246.                       If you want to  write new  values, specify  new  value for
  247.                       AutoScan in the lower word, and LastRead in the upper one.
  248.  
  249.             Data 3 <> Pass NULL for compability with future revisions
  250.  
  251. Returns   : Data 1 <> Lower  Word (Bits 00-15) = Auto Scan Pointer
  252.                       Higher Word (Bits 15-31) = Last Read Pointer
  253.  
  254.                       Note: When setting new values, old pointers will be
  255.                             returned.
  256.  
  257.             R-Code <> NULL if an error occurred and 1L when successful
  258.  
  259. ===( ID: 00011 - WAIT FOR A HOTKEY )============================================
  260.  
  261. Function  : This function simply waits for a single keypress from either the
  262.             local console or remote  terminal. After receiving a  character,
  263.             this function will immediately return with no further activity.
  264.  
  265. Parameters: Data 1 <> Parameters: BiT  WHAT WILL HAPPEN IF SET
  266.                                   ==========================================
  267.                                   000  Received character will be printed to
  268.                                        the local and remote screens.
  269.                                   001  Carriage Return  (CR=$0D) & Line Feed
  270.                                        (LF=$0A) will be included and printed
  271.                                        after the actual character. Note that
  272.                                        this won't do a thing unless BiT 0 is
  273.                                        also set.
  274.                   002  Check cursor keys. If this is active,
  275.                        cursor keys will be returned as  fol-
  276.                        lows:
  277.  
  278.                        250 - Up
  279.                        251 - Down
  280.                        252 - Right
  281.                        253 - Left
  282.  
  283.             Data 2 <> Pass NULL for compability with future revisions
  284.             Data 3 <> Pass NULL for compability with future revisions
  285.  
  286. Returns   : R-Code <> Received character or NULL if failed
  287.  
  288. Note      : The character is located in the upper byte of the word.
  289.             Therefore you should read it as a byte from offset 0.
  290.  
  291. ===( ID: 00012 - SCAN FILE DIRECTORIES )========================================
  292.  
  293. Function  : This function will scan all the file directories in the specified
  294.             conference and see if any of the files matches with given string;
  295.             wildcards allowed, of course. When a match is found, this routine
  296.             will  call a hook  routine with path, name  and size of  the file 
  297.             as it's  parameters allowing it to process the file in any wanted
  298.             way. After  the hook has  returned, scanning will or will  not be
  299.             continued depending on  whether  the search  string contained any
  300.             wildcards (if it didn't, no more than one match is possible).
  301.  
  302. Parameters: Data 1 <> Conference number in the lowest byte. Leave bits from
  303.                       eight (8) to thirtyone (31) down for compability with
  304.                       future revisions.
  305.             Data 2 <> Pointer to the search string, wildcards allowed.
  306.             Data 3 <> Pointer to the hook routine to call:
  307.  
  308.                       Hook(Path, Filename, Size, UserData);
  309.                            A0    A1        D0    D1
  310.  
  311.                       >WARNING< HOOK ROUTINE MAY ABSOLUTELY NOT
  312.                       MODIFY ANY SYSTEM   REGISTERS  UNLESS THE
  313.                       ORIGINAL VALUES ARE RETURNED BEFORE EXIT!
  314.  
  315.                       If this is NULL, use File tagging-routines of DayDream.
  316.  
  317.             Misc 1 <> Table of miscellaneous variables as follows:
  318.  
  319.                       OFFSET   TYPE     MEANING
  320.                       =======================================================
  321.                        0000    LONG     User  data  variable - will be  given
  322.                                         to Hook() routine  as provided  here.
  323.                                         This  will just pass  through DD  and
  324.                                         doesn't   have  any effect   on  DD's
  325.                                         operation. With  this  field you  can
  326.                                         easily pass some data to your hook.
  327.  
  328. Returns   : R-Code <> One of the following:
  329.  
  330.                       0 - Operation successful
  331.                       1 - Not enough memory (only 2048 bytes needed)
  332.                       2 - Specified conference not found
  333.                       3 - Specified conference doesn't have any file directories
  334.  
  335. ===( ID: 00013 - ADD FILE TO A DOWNLOAD REQUEST )===============================
  336.  
  337. Function  : This function will add a file to the download request. Current dload
  338.             request will be checked first to avoid  possible duplicate  entries.
  339.             If no duplicate entry or other  errors occurred, file will  be added
  340.             to the filechain.
  341.  
  342. Parameters: Data 1 <> Pointer  to the  path  where the file  to be added  can be
  343.                       found. PATH MUST END WITH A SLASH ('/') OR COLON (':')!
  344.             Data 2 <> Pointer to the actual filename (format: FILENAME.EXT)
  345.             Data 3 <> Some parameters as follows:
  346.  
  347.                       BIT    MEANING IF SET
  348.                       =====================================================
  349.                       000    FREE DOWNLOAD
  350.                              - File will be flagged even though ratios
  351.                                wouldn't normally allow it.
  352.                              - Downloading  this file  won't  increase 
  353.                                downloaded files / bytes counters.
  354.  
  355.             Misc 1 <> Table of miscellaneous variables as follows:
  356.  
  357.                       OFFSET   TYPE     MEANING
  358.                       =======================================================
  359.                        0000    LONG     SIZE OF THE FILE IN BYTES
  360.  
  361. Returns   : R-Code <> One of the following:
  362.  
  363.                       0 - Operation successful
  364.                       1 - Duplicate entry found
  365.                       2 - File ratio problems
  366.                       3 - Byte ratio problems
  367.                       4 - Not enough memory
  368.  
  369. ===( ID: 00014 - Disconnect user )===========================================
  370.  
  371. Function  : This function will disconnect user from BBS.
  372.  
  373. Parameters: None
  374.  
  375. Returns   : Nothing
  376.  
  377. ===( ID: 00015 - Run DayDream Command )======================================
  378.  
  379. Function  : Allows use of DayDream's menu commands (also doors).
  380.  
  381. Parameters: Data 1 <> Pointer to the string to be executed (Eg. "N S A")
  382.  
  383. Returns   : Nothing
  384.  
  385. ===( ID: 00016 - Reset idle counter )========================================
  386.  
  387. Function  : This function will reset the idle-counter. Useful for doors
  388.         having own serial/console routines, before and after archiving
  389.         something etc. Note that hotkey, prompt etc. routines reset
  390.         the idle counter automatically.
  391.  
  392. Parameters: None
  393.  
  394. Returns   : Nothing
  395.  
  396. ===( ID: 00017 - Relogin )===================================================
  397.  
  398. Function  : Same as exit door handler, except this will relogin user to the
  399.             system.
  400.  
  401. Parameters: None
  402.  
  403. Returns   : Nothing
  404.  
  405. ===( ID: 00018 - Inquire Structure Pointers 2 )==============================
  406.  
  407. Function  : This command will return with pointers to several significant
  408.             system structures, such as selected areas etc..
  409.  
  410. Parameters: None
  411.  
  412. Returns   : Data 1 <> Bps rate of current call
  413.  
  414.             Misc 1 <> Array of long word pointers as follows:
  415.  
  416.                       OFFSET  POINTER
  417.                       ==================================================
  418.                        0000   Node Structure
  419.                0004   Node Structure of current node
  420.                        0008   Pointer to incoming conversion table or null
  421.                0012   Pointer to outgoing conversion table or null
  422.                0016   Pointer to Security data of current user
  423.                        0020   Pointer to current Selected.DAT
  424.                0024   Pointer to IO-Device.DAT of current node
  425.                0028   Pointer to the door name
  426.                0032   Pointer to MultiNode.DAT
  427.  
  428. CAUTION!  : _NEVER_ USE THESE POINTERS AFTER DAYDREAM HAS CLOSED IT'S DOORPORT
  429.  
  430. ===( ID: 00019 - Join Conference )============================================
  431.  
  432. Function  : This function allows you to change conference.
  433.  
  434. Parameters: Data 1 <> Number of conference to join.
  435.             Data 2 <> Some parameters as follows:
  436.  
  437.                       BIT    MEANING IF SET
  438.                       =====================================================
  439.                       000    Ask new conference if not found.
  440.               001    Quick mode. This won't load any conference
  441.                  related files etc. If you use this, you MUST
  442.                  return to the original conference before exiting.
  443.               002    Skip JoinConference.TXT|GFX
  444.  
  445. ===( ID: 00020 - Change Msg Base )============================================
  446.  
  447. Function  : This function allows you to change message base.
  448.  
  449. Parameters: Data 1 <> Number of message base to change.
  450.             Data 2 <> Some parameters as follows:
  451.  
  452.                       BIT    MEANING IF SET
  453.                       =====================================================
  454.                       000    Show menu if Data 1 = 0.
  455.               001    Do not type messagebase status fields after
  456.                  changing the message base.
  457.  
  458. ===( ID: 00021 - Run internal command )=======================================
  459.  
  460. Function  : Same as "Run DayDream command" expect only INTERNAL commands
  461.         will be executed. So external commands will be skipped.
  462.  
  463. Parameters: Data 1 <> Pointer to the string to be executed (Eg. "N S A")
  464.  
  465. Returns   : Nothing
  466.  
  467. ===( ID: 00022 - Check for character )========================================
  468.  
  469. Function  : This function just checks if theres character in input buffer
  470.         and if there is, then returns it. Otherwise returns null.
  471.  
  472. Parameters: None
  473.  
  474. Returns   : The character is located in the upper byte of the word.
  475.             Therefore you should read it as a byte from offset 0.
  476.  
  477. ===( ID: 00023 - Edit File )==================================================
  478.  
  479. Function  : Edit file using DD's built in line editor.
  480.  
  481. Parameters: Data 1 <> Filename to edit (MODE_NEWFILE).
  482.  
  483. Returns   : Nothing.
  484.  
  485. ===( ID: 00024 - FIFO Execute )===============================================
  486.  
  487. Function  : Execute command and route output to serial and console using
  488.             FIFO:-shell. User may not input anything.
  489.  
  490. Parameters: Data 1 <> Command to execute. Following control-chars supported:
  491.  
  492.           %N = Node, %H = Handle, %R = Real name, %S = Screen length
  493.  
  494. Returns   : Nothing.
  495.  
  496. ===( ID: 00025 - Write Log )==================================================
  497.  
  498. Function  : Write specified text to the logfile.
  499.  
  500. Parameters: Data 1 <> Text to write. Following control-chars supported:
  501.  
  502.               %A = ARQ Report
  503.               %B = Baudrate
  504.               %D = Date
  505.               %H = Handle
  506.               %L = Location
  507.               %N = Node
  508.               %O = Organization
  509.               %S = Security
  510.               %T = Time
  511.               %U = Real name
  512.  
  513. Returns   : Nothing.
  514.  
  515.  
  516.  
  517.